<template>
	<view class="classifyLayout pageBg">
		<CustomNavBar title="分类"></CustomNavBar>
		<view class="classify">
			<ThemeItem v-for="(item,index) of classifyList" :item="item" :key="item._id"></ThemeItem>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	import {
		apiGetThemeList
	} from '@/api/api.js'

	let classifyList = ref([])


	/**
	 * 获取主题列表
	 */
	async function getThemeList() {
		let ret = await apiGetThemeList({
			pageSize: 15
		});
		classifyList.value = ret.data;
	}

	getThemeList();
</script>

<style lang="scss" scoped>
	.classify {
		padding: 30rpx;
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 15rpx;
	}
</style>